package com.tps.feign;

import com.tps.feign.fallback.GoodsFeignFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author charlee
 * @date 2018/4/30
 */
@Service
@FeignClient(name = "goods-server", fallback = GoodsFeignFallback.class)
public interface GoodsFeign {

    @GetMapping("/hello/{username}")
    String sayHello(@PathVariable("username") String username);

    @GetMapping("/save")
    void save();
}
